import request from '@/utils/request'

// 采购订单列表
export function orderList(query) {
  return request({
    url: '/supplier/order/list',
    method: 'get',
    params: query
  })
}

// 采购单详情
export function orderDetail(id) {
  return request({
    url: '/supplier/order/'+id,
    method: 'get',
  })
}

// 采购单发货
export function orderDelivery(data) {
  return request({
    url: '/supplier/order/delivery',
    method: 'post',
    data: data
  })
}

// 采购单取消
export function orderCancel(params) {
  return request({
    url: '/supplier/order/cancel',
    method: 'get',
    params: params
  })
}

// 确认对账
export function orderConfirm(id) {
  return request({
    url: '/supplier/order/confirmOrder',
    method: 'get',
    params: {id}
  })
}

// 采购单导出
export function orderExport(params) {
  return request({
    url: '/supplier/order/export',
    method: 'get',
    params: params
  })
}
